﻿using System.Collections.Generic;

namespace crc32
{
    public class CrcArgs
    {
        public CrcArgs()
        {
            MoveFiles = true;
        }

        public string Directory { get; set; }

        public bool MoveFiles { get; set; }

        public void Parse(string[] args)
        {
            var argList = new LinkedList<string>(args);
            while (argList.First != null)
            {
                switch (argList.First.Value)
                {
                    case "--directory":
                        argList.RemoveFirst();
                        Directory = argList.First.Value;
                        argList.RemoveFirst();
                        break;

                    case "--dontmove":
                        argList.RemoveFirst();
                        MoveFiles = false;
                        break;
                    case "--testfiles":
                        argList.RemoveFirst();
                        TestFiles = true;
                        break;
                }
                

            }
        }

        public bool TestFiles { get; set; }
    }
}